export function amountToNo(val) {
  const str = val.toString()
  const str2 = str.replace(/,/g, '')
  const arr = str2.split('')
  const index = arr.lastIndexOf('.')
  if (index != -1) {
    arr.map((v, i) => {
      if (v == '.' && i != index) {
        arr[i] = ''
      }
    })
  }

  return arr.join('')
}
